import http from "@/utils/request"


//获取学员信息

export const getStuListApi = (page = 1, count = 10, classes = "") => http.get('/students/getstulist', {
    params: {
        page,
        count,
        class: classes
    }
})


//增加学员信息
/**
 * 
 * @param {Object} props 一个数据对象 
 * @returns 
 */
export const addStuListApi = (props = {}) => http.post('/students/addstu', props)


//编辑学员信息

export const editStuApi = (props = {}) => http.post('/students/updatestu', props)


//删除学员信息

export const delStuApi = (sId) => http.get('/students/delstu', {
    params: {
        sId
    }
})

//搜索学员

export const searchStuApi = (key, count, page) => http.get('/students/searchstu', {
    params: {
        key, 
        count, 
        page
    }
})